package player;

import java.util.List;
import java.util.Set;

import pieces.Piece;
import core.Board;
import core.Move;

/**
 * Artificial Intelligence at its best. Maybe. In the future.
 * @author Tobias
 *
 */
public class ComputerPlayer implements Player {



	@Override
	public Move makeMove(Board board, List<Piece> myPieces, List<Piece> yourPieces) {


		List<Move> s;
		do {
			int piece = (int) (Math.random()*myPieces.size());
			Piece p = myPieces.get(piece);
			s = p.possibleMoves(board);
		}while(s.size() == 0);

		int indeks = (int) (Math.random()*s.size());

		Move m = s.get(indeks);

		return m;
	}

}
